package doyouknow.group.CnAndZhb.response;

/**
 * Created by a10.13.6 on 2019/4/23.
 */

public class LayuiTableReturnType {


    /**
     * 通用错误返回码 本类用于返回所有错误代码  当处理 成功之后会返回相应 的 json 结构体
     */


    //对应请求的处理结果，0,1
    private int code;

    private Object data;
    private Long count;
    private String msg;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public Long getCount() {
        return count;
    }

    public void setCount(Long count) {
        this.count = count;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public static LayuiTableReturnType create(Object result, int code, Long count , String msg) {
        LayuiTableReturnType type =new LayuiTableReturnType();
        type.setCode(code);
        type.setData(result);
        type.setMsg(msg);
        type.setCount(count);
        return  type;
    }


}
